Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add row context (right click) additionally to actions in tables #8013

Merged
merged 6 commits into from
Nov 14, 2024

Conversation

matmair
Copy link
Member

@matmair matmair commented Aug 27, 2024

This draft PR adds right-click context menus to tables. The content can be determined by a custom callback or computed from the row actions.
I am interested in feedback - you should be able to play with it using the preview deployment.
grafik
grafik

Closes invenhost#128

@matmair matmair added the Platform UI Related to the React based User Interface label Aug 27, 2024
@matmair matmair added this to the 0.17.0 milestone Aug 27, 2024
@matmair matmair self-assigned this Aug 27, 2024
Copy link

netlify bot commented Aug 27, 2024

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 3708d24
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/6736654c87da7c00083a652f
😎 Deploy Preview https://deploy-preview-8013--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 86 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 18.18182% with 9 lines in your changes missing coverage. Please review.

Project coverage is 84.41%. Comparing base (ee01ac5) to head (3708d24).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/frontend/src/tables/InvenTreeTable.tsx 18.18% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8013      +/-   ##
==========================================
+ Coverage   84.38%   84.41%   +0.02%     
==========================================
  Files        1178     1178              
  Lines       53733    53744      +11     
  Branches     2022     2027       +5     
==========================================
+ Hits        45345    45368      +23     
+ Misses       7875     7849      -26     
- Partials      513      527      +14     
Flag Coverage Δ
pui 68.87% <18.18%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SchrodingersGat
Copy link
Member

I think we need to have a larger conversation about how we interact with tables - and make the "user expectation" consistent.

There are:

  • Row actions (via buttons)
  • Row actions (via context menu)
  • Some rows take you somewhere else when you click them
  • Some rows open up a context drawer when clicked on

Is there a way we can visually indicate what happens when you left-click or right-click on a row, do you think?

@matmair
Copy link
Member Author

matmair commented Aug 29, 2024

I am not aware that other apps provide this, have not seen this pattern somewhere else consciously. Maybe linking somewhere else should just be a highlighted link somewhere at the beginning of the table to make it clear.

@matmair
Copy link
Member Author

matmair commented Nov 12, 2024

@SchrodingersGat how should we proceed here?

@SchrodingersGat
Copy link
Member

@matmair I am happy with this in principle. Looking at the current state, there are some visual styling issues that need to be addressed:

Here is a regular row-context menu (via the drop-down in the "actions" column):

image

And the same menu accessed via right-click context menu:

image

So, the colors need fixing, and some padding around the menu item

@matmair
Copy link
Member Author

matmair commented Nov 14, 2024

I will look into reusing the renderer from the actions dropdown

@matmair
Copy link
Member Author

matmair commented Nov 14, 2024

@SchrodingersGat I have addressed the styling; ready for review & merge

@SchrodingersGat
Copy link
Member

Fantastic, looks great now. This is a really nice addition.

@SchrodingersGat SchrodingersGat merged commit 65e4b69 into inventree:master Nov 14, 2024
26 checks passed
@SchrodingersGat SchrodingersGat deleted the pui-table-add-context branch November 14, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform UI Related to the React based User Interface
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

System: Make actions right-click too
2 participants